﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace PSI
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LINQDataContext bd = new LINQDataContext();

            var q = from x in bd.PSI_DaneFirmyTests
                          where x.login == "bla"
                          select x;

            foreach (var cust in q)
                Label1.Text=(cust.data.ToShortDateString());



            PSI_DaneFirmyTest dane = new PSI_DaneFirmyTest();
            dane.data = DateTime.ParseExact("11-11-2011","dd-MM-yyyy",null);
            DateTime dt = new DateTime();
            dt = DateTime.Now;
            dane.data = dt;
            dane.login = "x";
            dane.haslo = "x";
            dane.NazwaF = "x";
            bd.PSI_DaneFirmyTests.InsertOnSubmit(dane);
            bd.SubmitChanges();

        }
    }
}